package tech.aistar.corejava.day02;

/**
 * Created by 李雨昂 on 2019/7/17.
 */
public class CharDemoTest {
    public static void main(String[] args) {
        //char -> int
        //char底层unicode
        //char类型的数据是支持计算的

        char c1 = 'a' + 1;
        System.out.println("c1 = " + c1);

        char c2 = 'a';
        char c3 = (char) (c2 + 1);
        System.out.println("c3 = " + c3);

        int result = '0' + 2;//'0'的ascii为48
        System.out.println("result = " + result);//50
    }
}
